module.exports = {
  apps: [{
    name: "store",
    script: "./bin/www",
    env: {
      COMMON_VARIABLE: "true"
    },
    env_production: {
      NODE_ENV: "production"
    }
  }],
  deploy: {
    // "production" is the environment name
    production: {
      // SSH key path, default to $HOME/.ssh
      "key": "./store.pem",
      // SSH user
      "user": "root",
      // SSH host
      "host": ["47.95.248.152"],
      "port": "42424",
      // SSH options with no command-line flag, see 'man ssh'
      // can be either a single string or an array of strings
      "ssh_options": "StrictHostKeyChecking=no",
      // GIT remote/branch
      "ref": "origin/master",
      // GIT remote
      "repo": "git@gitee.com:anady/backend-website.git",
      // path in the server
      "path": "/root/www/store",
      // post-deploy action
      "post-deploy": "npm install && pm2 startOrRestart ecosystem.config.js --env production",
      "env": {
        "NODE_ENV": "production"
      }
    },
  }
}